package game;

import java.util.ArrayList;
import java.util.List;

import domain.league.ILeague;
import domain.league.League;
import domain.users.User;


public class GameData implements IGameData {

	private List<ILeague> leagues;
	private String title;
	private int gameID;
	
	public GameData(String title, int gameID) {
		this.title = title;
		this.gameID = gameID;
		// Add dummy Leagues.
		// TODO: Who creates leagues???
		leagues = new ArrayList<ILeague>();
		leagues.add(new League("League #1", new User(4, "LeagueOwner1", "LeagueOwner1@..", "LeagueOwner")));
		leagues.add(new League("League #2", new User(6, "LeagueOwner2", "LeagueOwner2@..", "LeagueOwner")));
	}
	
	public int getGameID() {
		return gameID;
	}
	
	public List<ILeague> getLeagues() {
		return leagues;
	}

	@Override
	public String toString() {
		return title + " (" + leagues.size() + " leagues)";
	}
	
}
